#ifndef _DS_TYPES_H
#define _DS_TYPES_H

#include <stdio.h>

#define TRUE		1
#define FALSE		0

#define SUCCESS		0
#define FAILD		1
#define OVERFLOW	2
#define INFEASIBLE	3
#define ERROR		4

typedef int Bool;
typedef int Status;

/* Use void* point to whatever pointer */
typedef struct {
	void	 *data;
	size_t	length;
	size_t	size;
} sq_list;

/* With head node, Single linked list */
typedef struct link_node {
	void	*data;
	struct link_node *next;
} lnode, *link_list;

/* doubly linked list with head node */
typedef struct dul_node {
	void *data;
	struct dul_node *prior, *next;
} dulnode, *dul_list;

/* stack sequel queue store */
typedef struct {
	void *base;
	void *top;
	int stacksize;
} sq_stack;

/* link queue with head node */
/* link queue node type */
typedef struct queue_node {
	void *data;
	struct queue_node *next;
} qnode;
/* link queue head node, struct_size save the size of data */
typedef struct {
	qnode *front;
	qnode *rear;
	size_t struct_size;
} link_queue;

/* hipe saved string */
typedef struct{
	char *ch;
	size_t length;
} dstring;

#endif
